import Vue from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'
// 导入饿了么ui
import './plugins/element.js'
import FormCreate from '@form-create/element-ui'
import Cookies from 'js-cookie'
// 重置样式的导入
import '@/assets/css/reset.css'
import './styles/element-variables.scss'
// import './permission' // permission control

import '@/styles/index.scss' // global css

// import notice from '@/libs/notice'
import { getToken } from './utils/auth'
import axios from 'axios'
// 配置请求的根路径
axios.defaults.baseURL = 'http://192.168.0.229:9000/'
Vue.prototype.$http = axios

// Vue.prototype.$modalForm = modalForm
Vue.config.productionTip = false

Vue.use(FormCreate)

// register global utility filters

const token = getToken()
console.log(token,"5465465465")
// let _notice
// if (token) {
//   _notice = notice(token)
// }


// Vue.use(Element, {
//   size: Cookies.get('size') || 'medium', // set element-ui default size
//   zIndex: 1000
// })

export default new Vue({
  el: '#app',
  router,
  // data: {
  //   notice: _notice
  // },
  // methods: {
  //   closeNotice() {
  //     this.notice && this.notice()
  //   }
  // },
  store,
  render: h => h(App)
})
